//
//  TokenBucket.h
//  CareRingApp
//
//  Created  on 2025/3/13.
//
    

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface TokenBucket : NSObject

@property(assign, nonatomic)int tokenCount; // 令牌数量
@property(assign, nonatomic)int intervalSecs; // 计时间隔 单位:秒

@property(copy, nonatomic)void (^timeoutBlock)(void); // 超时回调

// 开始
-(BOOL)start;

// 停止
-(void)stop;

// 充值令牌桶
-(void)chargeToken;

@end

NS_ASSUME_NONNULL_END
